{% import "bootstrap/wtf.html" as wtf %}
{% if 'index' in index %}
<div class="right-head">
<div class="panel panel-default">
	<div class="panel-body">
		<div class="col-sm-2">
			<img src="{{ url_for('static',filename='user/avatar/'+user.avatar) }}" style="width: 100px;height: 100px;">
		</div>
		<div class="col-sm-7">
			<h4>@{{ user.username }} {% if user.abortme %}<small> {{ user.abortme }}</small>{% endif %}</h4>
			<h4><small>{{ user.email }}</small></h4>
			<h5><a href="{{ url_for('main.user_follower_all', id=user.id) }}"> 关注者 <span class="badge">{{ user.followers.count() }}</span></a> <a href="{{ url_for('main.user_followed_all', id=user.id) }}"> 关注了 <span class="badge">{{ user.followed.count() }}</span></a></h5>
		</div>
		<div class="col-sm-3">
			{% if current_user.is_authenticated and current_user.is_follow(user) %}
			<a href="{{ url_for('main.user_unfollow',id=user.id) }}">
			<button type="button" class="btn btn-primary btn-sm">
			 取消关注
			</button></a>
			{% elif not user.is_self(current_user) %}
			<a href="{{ url_for('main.user_follow',id=user.id) }}">
			<button type="button" class="btn btn-primary btn-sm">
			 关注
			</button></a>
			{% endif %}
			{% if current_user.is_authenticated and user.is_follow(current_user) %}
			<button type="button" class="btn btn-info btn-sm">
			 关注了你
			</button>
			{% endif %}
		</div>
	</div>
</div>
</div>
{% if 'info' in index %}
{% include 'user/_user_post.html' %}
{% endif %}
{% elif 'seting' in index %}
<div class="panel panel-default" style="padding-bottom: 20px;">
    <div class="panel-heading">
		<ul class="nav nav-tabs">
		    <li {% if index=='seting1' %}class="active"{% endif %}><a href="{{ url_for('main.info_resp') }}">个人信息</a></li>
		    <li {% if index=='seting2' %}class="active"{% endif %}><a href="{{ url_for('main.passwd_resp') }}">密码设置</a></li>
		    <li {% if index=='seting3' %}class="active"{% endif %}><a href="{{ url_for('main.email_resp') }}">头像设置</a></li>
		</ul>
    </div>
    <div class="panel-body">
    	<div class="user-form col-md-8 col-md-offset-2">
		{{ wtf.quick_form(form) }}
		</div>
​    </div>
</div>

{% endif %}
{% if 'follower-all' in index %}
<div class="right-body">
{% include 'user/_follower_all.html' %}
</div>
{% elif 'followed-all' in index %}
<div class="right-body">
{% include 'user/_followed_all.html' %}
</div>
{% endif %}
